package com.jsz.peini.service.square;

import java.util.HashMap;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.jsz.peini.bean.square.SquareLike;
import com.jsz.peini.mapper.square.SquareLikeMapper;

@Service
public class SquareLikeService {
	
	@Resource
	private SquareLikeMapper squareLikeMapper;
	
	//查询是否点赞
	public List<SquareLike> selectByUser(SquareLike squareLike){
		List<SquareLike> list = squareLikeMapper.selectByUser(squareLike);
		return list;
	}
	
	public List<HashMap<String,Object>> selectBySquareId(Integer squareInfoId){
		List<HashMap<String,Object>> squareList = squareLikeMapper.selectBySquareId(squareInfoId);
		return squareList;
	}
	
	public int insert(SquareLike squareLike){
		int result = squareLikeMapper.insert(squareLike);
		return result;
	}
	
	public int delete(SquareLike squareLike){
		int result = squareLikeMapper.delete(squareLike);
		return result;
	}

}
